
import Vue from "vue"
import moment from 'moment'
import stores from '../stores'

Vue.filter('date', (date, format) => {

  if(!date) {
  return '';
}
const d = moment(date)
return d.format(format)

});

//过滤器，根据约定字符转换成代表的含义
Vue.filter('parseChar2Meaning', (input,statusArr) => {
  const obj = _.find(statusArr,{value: input});
  if(obj){
    return obj.key;
  }else{
    return input;
  }

});
